<template>
  <q-page class="column">
    <img alt="分享图片" style="height: calc(100vh - 50px);" :src="image" >    
  </q-page>
</template>

<style>
</style>

<script>
export default {
  name: 'PageIndexShare',
  data () {
    let type = '';
    let id = '';
    if(this.$route.query['event']) {
      type = 'event/';
      id = this.$route.query['event'];
    } else if(this.$route.query['mgroup']) {
      type = 'mgroup/';
      id = this.$route.query['mgroup'];
    }
    return {
      image: 'https://admin.nexttix.net/api/share/'+ type + id + '/summary.png'
    }
  },
  mounted() {
    let me = this;
    this.$api.ui.pageTitle = '豆瓣观影统计';
    if(this.$api.account.hasToken()) {
      this.$api.ui.pageBackBtn = function(){
        // TODO 
        me.$router.go(-1);
      }
    }

    console.log(this.$router);
  }
}
</script>